const WX_MP = "wzk-2004-wxtime-id"
const WX_TO="wx-2004-total"

const saveTimeId = (id) => {
  let timeId = getTimeId()
  timeId.push(id)
  wx.setStorageSync(WX_MP, timeId)
}

const getTimeId = () => {
  return wx.getStorageSync(WX_MP) || []
}
const saveTotal = (total) => {
  wx.setStorageSync(WX_TO,total)
}
const getTotal = () => {
  return wx.getStorageSync(WX_TO) || 0
}

const cloreTimeId = () => {
  return wx.clearStorageSync(WX_MP) 
}

module.exports={
  saveTimeId,
  getTimeId,
  cloreTimeId,
  saveTotal,
  getTotal
}